package net.sxnic.ugr.permission.dao;

import java.util.List;

import net.sxinfo.core.spring25.HibernateDao;
import net.sxnic.ugr.permission.Permission;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

@Repository("permissionDao")
public class HibernatePermissionDao extends HibernateDao<Permission,String> implements PermissionDao{

	@Override
	public List<Permission> getListByResId(String rid) {
		Query query = getCurrSession().createQuery("from Permission where res.id=? order by id");
		query.setParameter(0, rid);
		return query.list();
	}

}
